package book.ch3.StaticTest;
class Count{
	private int serial;
	private static int counter=0;
	Count(){
		counter++;
		serial=counter;
	}
	int getserial(){
		return serial;
	}
}
class StaticVar{
	static int x=100;
}
public class StaticTest {

	public static void main(String[] args) {
		Count c1=new Count();
		Count c2=new Count();
		System.out.println(c1.getserial());
		System.out.println(c2.getserial());
		System.out.println(StaticVar.x++);
		System.out.println(StaticVar.x++);

	}

}
